#ifndef INTERFACE_H
#define INTERFACE_H
#include "stm32f0xx.h"
#include "bsp.h"


/**************************SI24R1**************************/
void MySPI_W_CSN(uint8_t BitValue);

void MySPI_W_SCK(uint8_t BitValue);
	
void MySPI_W_MOSI(uint8_t BitValue);

uint8_t MySPI_R_MISO(void);

uint8_t MySPI_R_IRQ(void);

void MySPI_W_CE(uint8_t BitValue);

#define	MOSI      (MySPI_W_MOSI)             // Master Out, Slave In pin (output)
#define	MISO      (MySPI_R_MISO())             // Master In, Slave Out pin (input)
#define	SCK       (MySPI_W_SCK)             // Serial Clock pin, (output)
#define	CSN       (MySPI_W_CSN)             // Slave Select pin, (output to CSN)
#define	CE        (MySPI_W_CE)            // Chip Enable pin signal (output)
#define	IRQ       (MySPI_R_IRQ())            // Interrupt signal, from nRF24L01 (input)

/**************************EEPROM**************************/
void PAGE_Write(uint8_t * address);

void INITIALIZE_PAGE_Write(uint8_t* address);

/***************************CONTROL ONOFF POWER*******************************/
void Control_ST_OnOff(uint8_t BitValue);

/***********************************ADDRESS KEY RESERT*******************************/
uint8_t SCAN_KEY_Function(void);

#endif
